/*--------------------------------------------------------------------------------------
*This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
*****************
Compiler:uVision2 2.40
*****************
* website: http://www.bekencorp.com
---------------------------------------------------------------------------------------*/
#ifndef _BK_1088_H_
#define _BK_1088_H_

#include "config.h"

#ifdef __SMART_CPU__

#define CHIP_DEV_ID 0x80

//Chip tag
#define CHIP_ADDR 0xc0  //0x60<<1
#define READ_OP 0x20

//BK108X register map
#define REG0_DEVICE_ID 0x00
#define REG1_CHIP_ID   0x01
#define REG2_POWER_CFG 0x02
#define REG3_CHANNEL   0x03
#define REG4_SYS_CONF1 0x04
#define REG5_SYS_CONF2 0x05
#define REG6_SYS_CONF3 0x06

#define REG7_TEST1     0x07
#define REG8_TEST2     0x08
#define REG9_BOOT_CFG  0x09
#define REGa_STATUS_RSSI  0x0a
#define RDSR_BIT 15
#define STC_BIT 14
#define SF_BL_BIT 13
#define AFCRL_BIT 12
#define MW_CHANNEL_STEP 9


#define REGb_READ_CHAN  0x0b

bool  BK1088_Get_ID(void);
#ifdef  USE_1088E
void BK1088_Select_channel(u8 channel);
#endif
void BK1088_SetGPIO2(bool mute);
void BK1088_SetGPIO1(bool mute);
void BK1088_Intialization(void);
void BK1088_SetMute(u8  mute);
void BK1088_PowerOffProc();
void  BK1088_SetFreq(u16 curFreq);
bool  set_fre_BK1088(u16 freq);
void BK1088_SetVolume(u8 vol);

#endif

#endif


